
package std.unittest.prop_test
import std.collection.*
import std.math.abs

import std.random.Random
import std.math.*
import std.collection.filter
import std.unittest.common.*

@!APILevel[
    since: "22"
]
public interface Arbitrary<T> {
    @!APILevel[
        since: "22"
    ]
    static func arbitrary(random: RandomSource): Generator<T>
}

extend Unit <: Arbitrary<Unit> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(_: RandomSource): Generator<Unit>
}

extend Bool <: Arbitrary<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Bool>
}

extend Int8 <: Arbitrary<Int8> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Int8>
}

extend Int16 <: Arbitrary<Int16> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Int16>
}

extend Int32 <: Arbitrary<Int32> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Int32>
}

extend Int64 <: Arbitrary<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Int64>
}

extend IntNative <: Arbitrary<IntNative> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<IntNative>
}

extend UInt8 <: Arbitrary<UInt8> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<UInt8>
}

extend UInt16 <: Arbitrary<UInt16> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<UInt16>
}

extend UInt32 <: Arbitrary<UInt32> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<UInt32>
}

extend UInt64 <: Arbitrary<UInt64> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<UInt64>
}

extend UIntNative <: Arbitrary<UIntNative> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<UIntNative>
}

extend Float16 <: Arbitrary<Float16> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Float16>
}

extend Float32 <: Arbitrary<Float32> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Float32>
}

extend Float64 <: Arbitrary<Float64> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Float64>
}

extend Rune <: Arbitrary<Rune> {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitrary(random: RandomSource): Generator<Rune>
}

extend<T> Array<T> <: Arbitrary<Array<T>> where T <: Arbitrary<T> {
    /**
    * @throws OverflowException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitrary(random: RandomSource): Generator<Array<T>>
}

extend<T> ArrayList<T> <: Arbitrary<ArrayList<T>> where T <: Arbitrary<T> {
    /**
    * @throws OverflowException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitrary(random: RandomSource): Generator<ArrayList<T>>
}

extend<T> HashSet<T> <: Arbitrary<HashSet<T>> where T <: Arbitrary<T> {
    /**
    * @throws IllegalArgumentException
    * @throws OverflowException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitrary(random: RandomSource): Generator<HashSet<T>>
}

extend<K, V> HashMap<K, V> <: Arbitrary<HashMap<K, V>> where K <: Arbitrary<K>, V <: Arbitrary<V> {
    /**
    * @throws IllegalArgumentException
    * @throws OverflowException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitrary(random: RandomSource): Generator<HashMap<K, V>>
}

extend String <: Arbitrary<String> {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitrary(random: RandomSource): Generator<String>
}

extend<T> Option<T> <: Arbitrary<Option<T>> where T <: Arbitrary<T> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Option<T>>
}

extend Ordering <: Arbitrary<Ordering> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Ordering>
}

extend<R> Function0Wrapper<R> <: Arbitrary<Function0Wrapper<R>> where R <: Arbitrary<R> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<Function0Wrapper<R>>
}

extend<T0, T1> TupleWrapper2<T0, T1> <: Arbitrary<TupleWrapper2<T0, T1>>
        where T0 <: Arbitrary<T0>,
              T1 <: Arbitrary<T1> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<TupleWrapper2<T0, T1>>
}

extend<T0, T1, T2> TupleWrapper3<T0, T1, T2> <: Arbitrary<TupleWrapper3<T0, T1, T2>>
        where T0 <: Arbitrary<T0>,
              T1 <: Arbitrary<T1>,
              T2 <: Arbitrary<T2> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<TupleWrapper3<T0, T1, T2>>
}

extend<T0, T1, T2, T3> TupleWrapper4<T0, T1, T2, T3> <: Arbitrary<TupleWrapper4<T0, T1, T2, T3>>
        where T0 <: Arbitrary<T0>,
              T1 <: Arbitrary<T1>,
              T2 <: Arbitrary<T2>,
              T3 <: Arbitrary<T3> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<TupleWrapper4<T0, T1, T2, T3>>
}

extend<T0, T1, T2, T3, T4> TupleWrapper5<T0, T1, T2, T3, T4> <: Arbitrary<TupleWrapper5<T0, T1, T2, T3, T4>>
        where T0 <: Arbitrary<T0>,
              T1 <: Arbitrary<T1>,
              T2 <: Arbitrary<T2>,
              T3 <: Arbitrary<T3>,
              T4 <: Arbitrary<T4> {
    @!APILevel[
        since: "22"
    ]
    public static func arbitrary(random: RandomSource): Generator<TupleWrapper5<T0, T1, T2, T3, T4>>
}

@!APILevel[
    since: "22"
]
public interface ArbitraryRange<T> where T <: Arbitrary<T> & Comparable<T> {
    @!APILevel[
        since: "22"
    ]
    static func min(): T
    
    @!APILevel[
        since: "22"
    ]
    static func max(): T
    
    @!APILevel[
        since: "22"
    ]
    static func arbitraryRange(random: RandomSource, min: T, max: T): Generator<T>
}

extend Int64 <: ArbitraryRange<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): Int64
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: Int64, max: Int64): Generator<Int64>
}

extend UInt64 <: ArbitraryRange<UInt64> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): UInt64
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): UInt64
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: UInt64, max: UInt64): Generator<UInt64>
}

extend Int32 <: ArbitraryRange<Int32> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): Int32
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): Int32
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: Int32, max: Int32): Generator<Int32>
}

extend UInt32 <: ArbitraryRange<UInt32> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): UInt32
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): UInt32
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: UInt32, max: UInt32): Generator<UInt32>
}

extend Int16 <: ArbitraryRange<Int16> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): Int16
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): Int16
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: Int16, max: Int16): Generator<Int16>
}

extend UInt16 <: ArbitraryRange<UInt16> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): UInt16
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): UInt16
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: UInt16, max: UInt16): Generator<UInt16>
}

extend Int8 <: ArbitraryRange<Int8> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): Int8
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): Int8
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: Int8, max: Int8): Generator<Int8>
}

extend UInt8 <: ArbitraryRange<UInt8> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): UInt8
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): UInt8
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: UInt8, max: UInt8): Generator<UInt8>
}

extend IntNative <: ArbitraryRange<IntNative> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): IntNative
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): IntNative
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: IntNative, max: IntNative): Generator<IntNative>
}

extend UIntNative <: ArbitraryRange<UIntNative> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): UIntNative
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): UIntNative
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: UIntNative, max: UIntNative): Generator<UIntNative>
}

extend Float64 <: ArbitraryRange<Float64> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): Float64
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): Float64
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: Float64, max: Float64): Generator<Float64>
}

extend Float32 <: ArbitraryRange<Float32> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): Float32
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): Float32
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: Float32, max: Float32): Generator<Float32>
}

extend Float16 <: ArbitraryRange<Float16> {
    @!APILevel[
        since: "22"
    ]
    public static func min(): Float16
    
    @!APILevel[
        since: "22"
    ]
    public static func max(): Float16
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func arbitraryRange(random: RandomSource, min: Float16, max: Float16): Generator<Float16>
}

@!APILevel[
    since: "22"
]
public func emptyIterable<T>(): Iterable<T>

@!APILevel[
    since: "22"
]
public interface Generator<T> {
    @!APILevel[
        since: "22"
    ]
    func next(): T
}

@!APILevel[
    since: "22"
]
public class Generators {
    @!APILevel[
        since: "22"
    ]
    public static func generate<T>(l: T, r: T, body: (T, T) -> T): Generator<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func single<T>(value: T): Generator<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func generate<T>(body: () -> T): Generator<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func iterable<T>(random: RandomSource, collection: Array<T>): Generator<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func weighted<T>(random: RandomSource, variants: Array<(UInt64, Generator<T>)>): Generator<T>
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func pick<T>(random: RandomSource, variants: Array<Generator<T>>): Generator<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func lookup<T>(random: RandomSource): Generator<T> where T <: Arbitrary<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func mapped<T, R>(random: RandomSource, body: (T) -> R): Generator<R> where T <: Arbitrary<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func mapped<T1, T2, R>(random: RandomSource, body: (T1, T2) -> R): Generator<R> where T1 <: Arbitrary<T1>,
        T2 <: Arbitrary<T2>
    
    @!APILevel[
        since: "22"
    ]
    public static func mapped<T1, T2, T3, R>(random: RandomSource, body: (T1, T2, T3) -> R): Generator<R> where T1 <: Arbitrary<T1>,
        T2 <: Arbitrary<T2>, T3 <: Arbitrary<T3>
    
    @!APILevel[
        since: "22"
    ]
    public static func mapped<T1, T2, T3, T4, R>(random: RandomSource, body: (T1, T2, T3, T4) -> R): Generator<R> where T1 <: Arbitrary<T1>,
        T2 <: Arbitrary<T2>, T3 <: Arbitrary<T3>, T4 <: Arbitrary<T4>
}

@!APILevel[
    since: "22"
]
public class LazySeq<T> <: Iterable<T> {
    @!APILevel[
        since: "22"
    ]
    public static func of(iterable: Iterable<T>)
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func of(array: Array<T>)
    
    @!APILevel[
        since: "22"
    ]
    public init(element: T)
    
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public func iterator(): Iterator<T>
    
    @!APILevel[
        since: "22"
    ]
    public func concat(other: LazySeq<T>): LazySeq<T>
    
    @!APILevel[
        since: "22"
    ]
    public func prepend(element: T): LazySeq<T>
    
    @!APILevel[
        since: "22"
    ]
    public func append(element: T): LazySeq<T>
    
    @!APILevel[
        since: "22"
    ]
    public func mixWith(other: LazySeq<T>): LazySeq<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func mix(l1: LazySeq<T>, l2: LazySeq<T>)
    
    @!APILevel[
        since: "22"
    ]
    public static func mix(l1: LazySeq<T>, l2: LazySeq<T>, l3: LazySeq<T>)
    
    @!APILevel[
        since: "22"
    ]
    public static func mix(l1: LazySeq<T>, l2: LazySeq<T>, l3: LazySeq<T>, l4: LazySeq<T>)
    
    @!APILevel[
        since: "22"
    ]
    public static func mix(l1: LazySeq<T>, l2: LazySeq<T>, l3: LazySeq<T>, l4: LazySeq<T>, l5: LazySeq<T>)
    
    @!APILevel[
        since: "22"
    ]
    public func map<U>(body: (T) -> U): LazySeq<U>
}

extend Random {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func pick<T>(choices: Array<T>): T
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func pickWeighted<T>(choices: WeightTable<T>): T
}

extend Int16 <: FromFloat64<Int16> {
    @!APILevel[
        since: "22"
    ]
    public static func fromFloat64(f: Float64): Int16
}

extend Int32 <: FromFloat64<Int32> {
    @!APILevel[
        since: "22"
    ]
    public static func fromFloat64(f: Float64): Int32
}

extend Int64 <: FromFloat64<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static func fromFloat64(f: Float64): Int64
}

extend IntNative <: FromFloat64<IntNative> {
    @!APILevel[
        since: "22"
    ]
    public static func fromFloat64(f: Float64): IntNative
}

extend UInt16 <: FromFloat64<UInt16> {
    @!APILevel[
        since: "22"
    ]
    public static func fromFloat64(f_: Float64): UInt16
}

extend UInt32 <: FromFloat64<UInt32> {
    @!APILevel[
        since: "22"
    ]
    public static func fromFloat64(f_: Float64): UInt32
}

extend UInt64 <: FromFloat64<UInt64> {
    @!APILevel[
        since: "22"
    ]
    public static func fromFloat64(f_: Float64): UInt64
}

extend UIntNative <: FromFloat64<UIntNative> {
    @!APILevel[
        since: "22"
    ]
    public static func fromFloat64(f_: Float64): UIntNative
}

extend Random <: RandomSource {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestBool(): Bool
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestInt8(): Int8
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestInt16(): Int16
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestInt32(): Int32
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestInt64(): Int64
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestIntNative(): IntNative
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUInt8(): UInt8
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUInt16(): UInt16
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUInt32(): UInt32
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUInt64(): UInt64
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUIntNative(): UIntNative
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestFloat16(): Float16
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestFloat32(): Float32
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestFloat64(): Float64
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestRune(): Rune
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func nextIntNative(): IntNative
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func nextUIntNative(): UIntNative
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestInt64(l: Int64, r: Int64): Int64
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUInt64(l: UInt64, r: UInt64): UInt64
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestInt32(l: Int32, r: Int32): Int32
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUInt32(l: UInt32, r: UInt32): UInt32
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestInt16(l: Int16, r: Int16): Int16
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUInt16(l: UInt16, r: UInt16): UInt16
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestInt8(l: Int8, r: Int8): Int8
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUInt8(l: UInt8, r: UInt8): UInt8
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestIntNative(l: IntNative, r: IntNative): IntNative
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestUIntNative(l: UIntNative, r: UIntNative): UIntNative
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestFloat64(l: Float64, r: Float64): Float64
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestFloat32(l: Float32, r: Float32): Float32
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func suggestFloat16(l: Float16, r: Float16): Float16
}

@!APILevel[
    since: "22"
]
public interface RandomSource {
    @!APILevel[
        since: "22"
    ]
    func nextBool(): Bool
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    func nextInt8(): Int8
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    func nextInt16(): Int16
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    func nextInt32(): Int32
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    func nextInt64(): Int64
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    func nextInt8(max: Int8): Int8
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    func nextInt16(max: Int16): Int16
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    func nextInt32(max: Int32): Int32
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    func nextInt64(max: Int64): Int64
    
    @!APILevel[
        since: "22"
    ]
    func nextUInt8(): UInt8
    
    @!APILevel[
        since: "22"
    ]
    func nextUInt16(): UInt16
    
    @!APILevel[
        since: "22"
    ]
    func nextUInt32(): UInt32
    
    @!APILevel[
        since: "22"
    ]
    func nextUInt64(): UInt64
    
    @!APILevel[
        since: "22"
    ]
    func nextUInt8(max: UInt8): UInt8
    
    @!APILevel[
        since: "22"
    ]
    func nextUInt16(max: UInt16): UInt16
    
    @!APILevel[
        since: "22"
    ]
    func nextUInt32(max: UInt32): UInt32
    
    @!APILevel[
        since: "22"
    ]
    func nextUInt64(max: UInt64): UInt64
    
    @!APILevel[
        since: "22"
    ]
    func nextFloat16(): Float16
    
    @!APILevel[
        since: "22"
    ]
    func nextFloat32(): Float32
    
    @!APILevel[
        since: "22"
    ]
    func nextFloat64(): Float64
    
    @!APILevel[
        since: "22"
    ]
    func nextGaussianFloat64(mean!: Float64, sigma!: Float64): Float64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    func nextIntNative(): IntNative
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    func nextUIntNative(): UIntNative
    
    @!APILevel[
        since: "22"
    ]
    func suggestUInt8(): UInt8
    
    @!APILevel[
        since: "22"
    ]
    func suggestUInt16(): UInt16
    
    @!APILevel[
        since: "22"
    ]
    func suggestUInt32(): UInt32
    
    @!APILevel[
        since: "22"
    ]
    func suggestUInt64(): UInt64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    func suggestUIntNative(): UIntNative
    
    @!APILevel[
        since: "22"
    ]
    func suggestInt8(): Int8
    
    @!APILevel[
        since: "22"
    ]
    func suggestInt16(): Int16
    
    @!APILevel[
        since: "22"
    ]
    func suggestInt32(): Int32
    
    @!APILevel[
        since: "22"
    ]
    func suggestInt64(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    func suggestIntNative(): IntNative
    
    @!APILevel[
        since: "22"
    ]
    func suggestFloat16(): Float16
    
    @!APILevel[
        since: "22"
    ]
    func suggestFloat32(): Float32
    
    @!APILevel[
        since: "22"
    ]
    func suggestFloat64(): Float64
    
    @!APILevel[
        since: "22"
    ]
    func suggestBool(): Bool
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    func suggestRune(): Rune
    
    @!APILevel[
        since: "22"
    ]
    func suggestInt64(l: Int64, r: Int64): Int64
    
    @!APILevel[
        since: "22"
    ]
    func suggestUInt64(l: UInt64, r: UInt64): UInt64
    
    @!APILevel[
        since: "22"
    ]
    func suggestInt32(l: Int32, r: Int32): Int32
    
    @!APILevel[
        since: "22"
    ]
    func suggestUInt32(l: UInt32, r: UInt32): UInt32
    
    @!APILevel[
        since: "22"
    ]
    func suggestInt16(l: Int16, r: Int16): Int16
    
    @!APILevel[
        since: "22"
    ]
    func suggestUInt16(l: UInt16, r: UInt16): UInt16
    
    @!APILevel[
        since: "22"
    ]
    func suggestInt8(l: Int8, r: Int8): Int8
    
    @!APILevel[
        since: "22"
    ]
    func suggestUInt8(l: UInt8, r: UInt8): UInt8
    
    @!APILevel[
        since: "22"
    ]
    func suggestIntNative(l: IntNative, r: IntNative): IntNative
    
    @!APILevel[
        since: "22"
    ]
    func suggestUIntNative(l: UIntNative, r: UIntNative): UIntNative
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    func suggestFloat64(l: Float64, r: Float64): Float64
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    func suggestFloat32(l: Float32, r: Float32): Float32
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    func suggestFloat16(l: Float16, r: Float16): Float16
}

@!APILevel[
    since: "22"
]
public struct KeyRandom <: KeyFor<RandomSource> {
    @!APILevel[
        since: "22"
    ]
    public static prop random: KeyRandom
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public class RandomDataProvider<T> <: DataProvider<T> where T <: Arbitrary<T> {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public RandomDataProvider(private let configuration: Configuration)
    
    @!APILevel[
        since: "22"
    ]
    public override func provide(): Iterable<T>
}

@!APILevel[
    since: "22"
]
public class RandomDataShrinker<T> <: DataShrinker<T> {
    @!APILevel[
        since: "22"
    ]
    public override func shrink(value: T): Iterable<T>
}

@!APILevel[
    since: "22"
]
public class RandomDataStrategy<T> <: DataStrategy<T> where T <: Arbitrary<T> {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public override func provider(configuration: Configuration): RandomDataProvider<T>
    
    @!APILevel[
        since: "22"
    ]
    public override func shrinker(_: Configuration): RandomDataShrinker<T>
    
    @!APILevel[
        since: "22"
    ]
    public override prop isInfinite: Bool
}

@!APILevel[
    since: "22"
]
public func random<T>(): RandomDataStrategy<T> where T <: Arbitrary<T>

@!APILevel[
    since: "22"
]
public class RandomDataProviderRange<T> <: DataProvider<T> where T <: ArbitraryRange<T> {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public RandomDataProviderRange(private let configuration: Configuration, private let min: T, private let max: T)
    
    @!APILevel[
        since: "22"
    ]
    public override func provide(): Iterable<T>
}

@!APILevel[
    since: "22"
]
public class RandomDataShrinkerRange<T> <: DataShrinker<T> where T <: Comparable<T> {
    @!APILevel[
        since: "22"
    ]
    public override func shrink(value: T): Iterable<T>
}

@!APILevel[
    since: "22"
]
public class RandomDataStrategyRange<T> <: DataStrategy<T> where T <: ArbitraryRange<T> {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public override func provider(configuration: Configuration): RandomDataProviderRange<T>
    
    @!APILevel[
        since: "22"
    ]
    public override func shrinker(_: Configuration): RandomDataShrinkerRange<T>
    
    @!APILevel[
        since: "22"
    ]
    public override prop isInfinite: Bool
}

/**
* @throws IllegalArgumentException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func randomInRange<T>(min!: Option<T> = None, max!: Option<T> = None): RandomDataStrategyRange<T> where T <: ArbitraryRange<T>

@!APILevel[
    since: "22"
]
public interface Shrink<T> {
    @!APILevel[
        since: "22"
    ]
    func shrink(): Iterable<T>
}



extend Int8 <: Shrink<Int8> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<Int8>
}

extend Int16 <: Shrink<Int16> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<Int16>
}

extend Int32 <: Shrink<Int32> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<Int32>
}

extend Int64 <: Shrink<Int64> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<Int64>
}

extend IntNative <: Shrink<IntNative> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<IntNative>
}

extend UInt8 <: Shrink<UInt8> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<UInt8>
}

extend UInt16 <: Shrink<UInt16> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<UInt16>
}

extend UInt32 <: Shrink<UInt32> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<UInt32>
}

extend UInt64 <: Shrink<UInt64> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<UInt64>
}

extend UIntNative <: Shrink<UIntNative> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<UIntNative>
}

extend Float16 <: Shrink<Float16> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<Float16>
}

extend Float32 <: Shrink<Float32> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<Float32>
}

extend Float64 <: Shrink<Float64> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<Float64>
}

extend Rune <: Shrink<Rune> {
    /**
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<Rune>
}

extend<T> Array<T> <: CanShrinkElements<Array<T>> where T <: Shrink<T> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrinkUsingElements(): LazySeq<Array<T>>
}

extend<T> Array<T> <: Shrink<Array<T>> {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<Array<T>>
}

extend<T> ArrayList<T> <: CanShrinkElements<ArrayList<T>> where T <: Shrink<T> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrinkUsingElements(): LazySeq<ArrayList<T>>
}

extend<T> ArrayList<T> <: Shrink<ArrayList<T>> {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<ArrayList<T>>
}

extend<T> HashSet<T> <: CanShrinkElements<HashSet<T>> where T <: Shrink<T> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrinkUsingElements(): LazySeq<HashSet<T>>
}

extend<T> HashSet<T> <: Shrink<HashSet<T>> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<HashSet<T>>
}

extend<K, V> ShrinkKeyWrapper<K, V> <: CanShrinkElements<HashMap<K, V>> where K <: Shrink<K> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrinkUsingElements(): LazySeq<HashMap<K, V>>
}

extend<K, V> HashMap<K, V> <: CanShrinkElements<HashMap<K, V>> where V <: Shrink<V> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrinkUsingElements(): LazySeq<HashMap<K, V>>
}

extend<K, V> HashMap<K, V> <: Shrink<HashMap<K, V>> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<HashMap<K, V>>
}

extend String <: Shrink<String> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func shrink(): Iterable<String>
}

extend<T> Option<T> <: CanShrinkElements<Option<T>> where T <: Shrink<T> {
    @!APILevel[
        since: "22"
    ]
    public func shrinkUsingElements(): LazySeq<Option<T>>
}

extend<T> Option<T> <: Shrink<Option<T>> {
    @!APILevel[
        since: "22"
    ]
    public func shrink(): Iterable<Option<T>>
}


extend<T0, T1> TupleWrapper2<T0, T1> <: Shrink<TupleWrapper2<T0, T1>>
        where T0 <: Shrink<T0>,
              T1 <: Shrink<T1> {
    @!APILevel[
        since: "22"
    ]
    public func shrink(): Iterable<TupleWrapper2<T0, T1>>
}

extend<T0, T1, T2> TupleWrapper3<T0, T1, T2> <: Shrink<TupleWrapper3<T0, T1, T2>>
        where T0 <: Shrink<T0>,
              T1 <: Shrink<T1>,
              T2 <: Shrink<T2> {
    @!APILevel[
        since: "22"
    ]
    public func shrink(): Iterable<TupleWrapper3<T0, T1, T2>>
}

extend<T0, T1, T2, T3> TupleWrapper4<T0, T1, T2, T3> <: Shrink<TupleWrapper4<T0, T1, T2, T3>>
        where T0 <: Shrink<T0>,
              T1 <: Shrink<T1>,
              T2 <: Shrink<T2>,
              T3 <: Shrink<T3> {
    @!APILevel[
        since: "22"
    ]
    public func shrink(): Iterable<TupleWrapper4<T0, T1, T2, T3>>
}

extend<T0, T1, T2, T3, T4> TupleWrapper5<T0, T1, T2, T3, T4> <: Shrink<TupleWrapper5<T0, T1, T2, T3, T4>>
        where T0 <: Shrink<T0>,
              T1 <: Shrink<T1>,
              T2 <: Shrink<T2>,
              T3 <: Shrink<T3>,
              T4 <: Shrink<T4> {
    @!APILevel[
        since: "22"
    ]
    public func shrink(): Iterable<TupleWrapper5<T0, T1, T2, T3, T4>>
}

@!APILevel[
    since: "22"
]
public class ShrinkHelpers {
    @!APILevel[
        since: "22"
    ]
    public static func shrinkTuple<T0, T1>(
        tuple: (T0, T1),
        t0: Iterable<T0>,
        t1: Iterable<T1>
    ): Iterable<(T0, T1)>
    
    @!APILevel[
        since: "22"
    ]
    public static func shrinkTuple<T0, T1, T2>(
        tuple: (T0, T1, T2),
        t0: Iterable<T0>,
        t1: Iterable<T1>,
        t2: Iterable<T2>
    ): Iterable<(T0, T1, T2)>
    
    @!APILevel[
        since: "22"
    ]
    public static func shrinkTuple<T0, T1, T2, T3>(
        tuple: (T0, T1, T2, T3),
        t0: Iterable<T0>,
        t1: Iterable<T1>,
        t2: Iterable<T2>,
        t3: Iterable<T3>
    ): Iterable<(T0, T1, T2, T3)>
    
    @!APILevel[
        since: "22"
    ]
    public static func shrinkTuple<T0, T1, T2, T3, T4>(
        tuple: (T0, T1, T2, T3, T4),
        t0: Iterable<T0>,
        t1: Iterable<T1>,
        t2: Iterable<T2>,
        t3: Iterable<T3>,
        t4: Iterable<T4>
    ): Iterable<(T0, T1, T2, T3, T4)>
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func mix<T>(iterables: Array<Iterable<T>>): Iterable<T>
}

@!APILevel[
    since: "22"
]
public struct Function0Wrapper<R> {
    @!APILevel[
        since: "22"
    ]
    public Function0Wrapper(public let function: () -> R)
    
    @!APILevel[
        since: "22"
    ]
    public operator func () (): R
}

@!APILevel[
    since: "22"
]
public struct TupleWrapper2<T0, T1> {
    @!APILevel[
        since: "22"
    ]
    public TupleWrapper2(public let tuple: (T0, T1))
    
    @!APILevel[
        since: "22"
    ]
    public func apply<R>(f: (T0, T1) -> R): R
}

@!APILevel[
    since: "22"
]
public struct TupleWrapper3<T0, T1, T2> {
    @!APILevel[
        since: "22"
    ]
    public TupleWrapper3(public let tuple: (T0, T1, T2))
    
    @!APILevel[
        since: "22"
    ]
    public func apply<R>(f: (T0, T1, T2) -> R): R
}

@!APILevel[
    since: "22"
]
public struct TupleWrapper4<T0, T1, T2, T3> {
    @!APILevel[
        since: "22"
    ]
    public TupleWrapper4(public let tuple: (T0, T1, T2, T3))
    
    @!APILevel[
        since: "22"
    ]
    public func apply<R>(f: (T0, T1, T2, T3) -> R): R
}

@!APILevel[
    since: "22"
]
public struct TupleWrapper5<T0, T1, T2, T3, T4> {
    @!APILevel[
        since: "22"
    ]
    public TupleWrapper5(public let tuple: (T0, T1, T2, T3, T4))
    
    @!APILevel[
        since: "22"
    ]
    public func apply<R>(f: (T0, T1, T2, T3, T4) -> R): R
}

extend<T0, T1> TupleWrapper2<T0, T1> <: ToString
        where T0 <: ToString, T1 <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func toString()
}

extend<T0, T1, T2> TupleWrapper3<T0, T1, T2> <: ToString
        where T0 <: ToString, T1 <: ToString, T2 <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func toString()
}

extend<T0, T1, T2, T3> TupleWrapper4<T0, T1, T2, T3> <: ToString
        where T0 <: ToString, T1 <: ToString, T2 <: ToString, T3 <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func toString()
}

extend<T0, T1, T2, T3, T4> TupleWrapper5<T0, T1, T2, T3, T4> <: ToString
        where T0 <: ToString, T1 <: ToString, T2 <: ToString, T3 <: ToString, T4 <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func toString()
}

extend<T0, T1> TupleWrapper2<T0, T1> <: Equatable<TupleWrapper2<T0, T1>> where T0 <: Equatable<T0>, T1 <: Equatable<T1> {
    @!APILevel[
        since: "22"
    ]
    public operator func ==(other: TupleWrapper2<T0, T1>)
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(other: TupleWrapper2<T0, T1>)
}

extend<T0, T1, T2> TupleWrapper3<T0, T1, T2> <: Equatable<TupleWrapper3<T0, T1, T2>>
        where T0 <: Equatable<T0>, T1 <: Equatable<T1>, T2 <: Equatable<T2> {
    @!APILevel[
        since: "22"
    ]
    public operator func ==(other: TupleWrapper3<T0, T1, T2>)
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(other: TupleWrapper3<T0, T1, T2>)
}

extend<T0, T1, T2, T3> TupleWrapper4<T0, T1, T2, T3> <: Equatable<TupleWrapper4<T0, T1, T2, T3>>
        where T0 <: Equatable<T0>, T1 <: Equatable<T1>, T2 <: Equatable<T2>, T3 <: Equatable<T3> {
    @!APILevel[
        since: "22"
    ]
    public operator func ==(other: TupleWrapper4<T0, T1, T2, T3>)
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(other: TupleWrapper4<T0, T1, T2, T3>)
}

extend<T0, T1, T2, T3, T4> TupleWrapper5<T0, T1, T2, T3, T4> <: Equatable<TupleWrapper5<T0, T1, T2, T3, T4>>
        where T0 <: Equatable<T0>, T1 <: Equatable<T1>, T2 <: Equatable<T2>, T3 <: Equatable<T3>, T4 <: Equatable<T4> {
    @!APILevel[
        since: "22"
    ]
    public operator func ==(other: TupleWrapper5<T0, T1, T2, T3, T4>)
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(other: TupleWrapper5<T0, T1, T2, T3, T4>)
}

@!APILevel[
    since: "22"
]
public interface IndexAccess {
    @!APILevel[
        since: "22"
    ]
    func getElementAsAny(index: Int64): ?Any
}

extend<T0, T1> TupleWrapper2<T0, T1> <: IndexAccess {
    @!APILevel[
        since: "22"
    ]
    public func getElementAsAny(index: Int64): ?Any
}

extend<T0, T1, T2> TupleWrapper3<T0, T1, T2> <: IndexAccess {
    @!APILevel[
        since: "22"
    ]
    public func getElementAsAny(index: Int64): ?Any
}

extend<T0, T1, T2, T3> TupleWrapper4<T0, T1, T2, T3> <: IndexAccess {
    @!APILevel[
        since: "22"
    ]
    public func getElementAsAny(index: Int64): ?Any
}

extend<T0, T1, T2, T3, T4> TupleWrapper5<T0, T1, T2, T3, T4> <: IndexAccess {
    @!APILevel[
        since: "22"
    ]
    public func getElementAsAny(index: Int64): ?Any
}

